package com.taotao.starter;

import com.taotao.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;

public class ApplicationRunnerImpl implements ApplicationRunner {
    @Autowired
    private RegisterService registerService;

    /**
     * springboot项目启动完成后走回调
     *
     * @param args
     * @throws Exception
     */
    @Override
    public void run(ApplicationArguments args) throws Exception {
        //1获取ip端口号
        registerService.register();
        //2 使用httpclient技术发送rest请求，服务注册

    }
}